package com.mxnet.chongjin.supoman.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * author: Administrator
 * email: lcj270018655@163.com
 * date: 2018/5/23
 */

public class Part implements Parcelable {

    /**
     * id : 83ea3a04-575b-11e8-b1c4-7cd30ac4e6a6
     * paramCode : 1
     * paramName : 充电站上盖
     * seq : 1
     * typeCode : 006
     * typeId :
     * typeName : 零部件类型一中文版
     */

    private String id;
    private String paramCode;
    private String paramName;
    private int seq;
    private String typeCode;
    private String typeId;
    private String typeName;
    private boolean isSelected;

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParamCode() {
        return paramCode;
    }

    public void setParamCode(String paramCode) {
        this.paramCode = paramCode;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Override
    public String toString() {
        return "Part{" +
                "id='" + id + '\'' +
                ", paramCode='" + paramCode + '\'' +
                ", paramName='" + paramName + '\'' +
                ", seq=" + seq +
                ", typeCode='" + typeCode + '\'' +
                ", typeId='" + typeId + '\'' +
                ", typeName='" + typeName + '\'' +
                ", isSelected=" + isSelected +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.paramCode);
        dest.writeString(this.paramName);
        dest.writeInt(this.seq);
        dest.writeString(this.typeCode);
        dest.writeString(this.typeId);
        dest.writeString(this.typeName);
        dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
    }

    public Part() {
    }

    protected Part(Parcel in) {
        this.id = in.readString();
        this.paramCode = in.readString();
        this.paramName = in.readString();
        this.seq = in.readInt();
        this.typeCode = in.readString();
        this.typeId = in.readString();
        this.typeName = in.readString();
        this.isSelected = in.readByte() != 0;
    }

    public static final Parcelable.Creator<Part> CREATOR = new Parcelable.Creator<Part>() {
        @Override
        public Part createFromParcel(Parcel source) {
            return new Part(source);
        }

        @Override
        public Part[] newArray(int size) {
            return new Part[size];
        }
    };
}
